home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9355 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  907 b 

  1. Path: linux.nildram.co.uk!usenet
  2. From: colin@greench.co.uk (Colin Wray)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A question on for loop..
  5. Date: Sat, 09 Mar 1996 19:08:26 GMT
  6. Organization: Greenchurch Software Ltd
  7. Message-ID: <4hslah$jvq@linux.nildram.co.uk>
  8. References: <4hn80a$98q@male.EBay.Sun.COM>
  9. NNTP-Posting-Host: ppp8.nildram.co.uk
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. murali@sooraj.ebay.sun.com (Murali Chari) wrote:
  13.  
  14. >Hi,
  15.  
  16. >In the following piece of code:
  17.  
  18. >for(i=0;i< 20; i++)
  19.  
  20. >{
  21.  
  22.  
  23. >  
  24. >  if(condition==FALSE)
  25. >  continue;
  26.  
  27.  
  28.  
  29.  
  30. >} 
  31.  
  32. >Let us assume i=10 before it entered the loop.
  33. >The condition was false. So the continue statement
  34. >got executed.
  35.  
  36. >Will control now go to the third statement in the for loop?
  37. >i.e. will i be incremented by 1 and again tested for the condition?
  38.  
  39. >Thanx 
  40.  
  41. >Murali
  42.  
  43. Quite simply - Yes.
  44. But why not put a printf call in the loop, and watch all the
  45. variables.
  46.  
  47. -Colin
  48.  
  49.